home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS20.ADF / Bankn / banknq.doc < prev    next >
Text File  |  1989-01-27  |  12KB  |  255 lines

  1.                               Query Instructions
  2.        
  3.        
  4.        The Query program will  allow  you  to  produce a report based on
  5.        your selection,  sorting  and  formatting  specifications.   Upon
  6.        entry, you will be presented  with  a  data dictionary and string
  7.        gadgets  for  entering  your  record   selection  criteria,  sort
  8.        sequence and output report format.
  9.        
  10.        The data dictionary presents  you  with a list of data names that
  11.        can be used to display or print values contained in the database.
  12.        
  13.        The Select string gadget will allow you to specify some selection
  14.        criteria to be used to determine which  database  entries will be
  15.        included in you output display or report.  For example,
  16.        
  17.             SELECT:
  18.             (Payee = "Allstate" or "State Farm") and Amount > 100.00"
  19.        
  20.        specifies that the database is to be searched for Payees with the
  21.        name of "Allstate" or  "State  Farm"  with  an  Amount > $100.00.
  22.        Remember that in order  to  enter  data  into a string gadget you
  23.        must first position the pointer within the gadget and depress the
  24.        left button on  the  mouse.   Note  that  the  Select  parameters
  25.        contain  parentheses  to  prevent  ambiguities.   If  there  is a
  26.        possibility that the  key  word  or  phrase  you  are looking for
  27.        contains occurrences with both upper  and lower case letters, you
  28.        must check for both,  e.g.,  "Allstate"  or  "allstate".  Another
  29.        method is to use the wild character, e.g., "?llstate".
  30.        
  31.        The Sort string gadget will allow  you to specify the sequence in
  32.        which the selected records are  to  be displayed or printed.  For
  33.        example,
  34.        
  35.             SORT:
  36.             Date
  37.        
  38.        specifies that the selected database  entries are to be sorted in
  39.        Date sequence.  Only one sort field may be specified.
  40.        
  41.        The Report string gadget will allow  you to specify the format of
  42.        the output display or report.  For example,
  43.        
  44.             REPORT:
  45.             Date, col 13, Type, col 18, Payee, col 44, Amount
  46.        
  47.        specifies that the Date, Type, Payee  and Amount for the selected
  48.        records are to be displayed.   Further,  it is specified that the
  49.        Date is to be displayed beginning in column 1, the Type in column
  50.        13, the Payee in column 18 and  Amount  in column 44.  The Report
  51.        specification  parameters  may  be  very  simple  or very complex
  52.        depending upon the skill of the  user.   Upon  entering the Query
  53.        program, you will find  that  the  Report  string  gadget already
  54.        contains some parameters.  These parameters have been designed to
  55.        simply list and total  the  selected  transactions.   You may use
  56.        these parameters or enter your customized  report specifications.
  57.        To erase the content on the  Report  string  gadget, first select
  58.        the gadget and then depress  Right  AMIGA  - X.  To undo (cancel)
  59.        the last editing change to the  string,  depress Right AMIGA - Q.
  60.        The Report specification  parameters  can be classified as either
  61.        describing "when to do it" or "what to do".
  62.        
  63.        When To Do It:
  64.                 
  65.                 page_top - specifies that subsequent functions are to be
  66.                 executed at the top each printed page or screen.
  67.                 
  68.                 page_bottom - specifies that subsequent functions are to
  69.                 the executed  at  the  bottom  of  each  printed page or
  70.                 screen.
  71.                 
  72.                 report_top - specifies that subsequent  functions are to
  73.                 be executed only at the beginning of the output report.
  74.                 
  75.                 report_bottom - specifies that  subsequent functions are
  76.                 to executed only at the end of the report.
  77.                 
  78.                 top(<data-name>) -  specifies  that subsequent functions
  79.                 are to be executed after there  has been a change in the
  80.                 content  of   <data-name>.    For  example,  top(Payee).
  81.                 Normally, the specified  data-name  will  be the same as
  82.                 the sort sequence.
  83.                 
  84.                 bottom(<data-name>)   -   specifies    that   subsequent
  85.                 functions are to be executed before there is a change in
  86.                 the content of data-name.  For example, bottom(EC).
  87.                 
  88.                 detail - specifies that the subsequent  functions are to
  89.                 be executed for each selected database entry.
  90.                 
  91.        What To Do:
  92.        
  93.                 print - specifies that all output is to be routed to the
  94.                 printer.  Default values  for  tm, bm and bod are set to
  95.                 4, 8, and 54 respectively.
  96.                 
  97.                 display - specifies that  all  output is to be routed to
  98.                 the screen.  "Display" is  the  output default.  Default
  99.                 values for tm,  bm  and  bod  are  set  to  0, 0, and 22
  100.                 respectively.
  101.                 
  102.                 tm nn - sets the top  margin  for  the output display or
  103.                 report to the value specified by nn.
  104.                 
  105.                 bm nn - sets the bottom margin for the output display or
  106.                 report to the value specified by nn.
  107.                 
  108.                 bod nn - sets the body of  the  output display or report
  109.                 to the value specified by nn.  The sum of tm, bm and bod
  110.                 must equal the desired page length.
  111.                 
  112.                 <data-name> -  causes  the  specified  data  name  to be
  113.                 printed  or  displayed.   For   example,  "Payee"  is  a
  114.                 data-name.
  115.                 
  116.                 "literal" - causes the  specified  literal to be printed
  117.                 or  displayed.   For  example,  "The  result  is:"  is a
  118.                 literal.
  119.                 
  120.                 trim<data-name> - caused  the  specified data name to be
  121.                 printed or displayed after all trailing spaces have been
  122.                 eliminated.  For example, "trim(Payee)".
  123.                 
  124.                 total(<data-name>) - specifies  that the summed value of
  125.                 <data-name> is to be  printed  or displayed.  An numeric
  126.                 data item  from the dictionary or a numeric literal must
  127.                 be   substituted   for   <data-name>.     For   example,
  128.                 "total(Amount)".   "total(1)"  can  be used to provide a
  129.                 count of the transactions.
  130.                 
  131.                 spacer nn - causes  nn  spaces  to  be  inserted between
  132.                 output data items.  The default is 1.
  133.                 
  134.                 col nn - causes  the  next  specified  data  item  to be
  135.                 displayed or printed in the column specified by nn.
  136.                 
  137.                 skip n - causes n lines to be  skipped before displaying
  138.                 or printing the next data item.  If n is not provided, 1
  139.                 is assumed.
  140.                 
  141.                 pause - causes a pause in the output process until a key
  142.                 (any key) is depressed.
  143.                 
  144.                 eject - if "print"  has  been  specified,  this  command
  145.                 causes the paper to be  ejected  to  the top of the next
  146.                 page; otherwise, the screen will be cleared.
  147.                 
  148.                 
  149.                 EDITING MASKS
  150.                 
  151.                 Numeric Editing Masks may  be  used  to cause predefined
  152.                 characters to be imbedded  within  displayed  or printed
  153.                 numeric items.  Numeric items are identified in the data
  154.                 dictionary with  the  character  "n"  following the data
  155.                 name.  The masks must be constructed  as an alphanumeric
  156.                 literal whose  first  character  is  "%".  If the second
  157.                 character of the mask  literal  is  other than a numeric
  158.                 character, that  character  will  be  placed in the next
  159.                 left most position before  the  resulting edited numeric
  160.                 value.
  161.                 
  162.                 Examples:
  163.                 
  164.                      Input Values       Mask         Output
  165.                 
  166.                          01000        "%9,999"        1,000
  167.                 
  168.                          25245      "%$99,999"      $25,245
  169.                 
  170.                          -5643     "%$999,999"      $-5,643
  171.                 
  172.                 Alphanumeric  Editing   Masks   may  be  used  to  cause
  173.                 predefined characters to be imbedded within displayed or
  174.                 printed  alphanumeric  items.   Alphanumeric  items  are
  175.                 identified in the data dictionary with the character "c"
  176.                 following the data name.   The  mask must be constructed
  177.                 as an alphanumeric literal whose first character is "%".
  178.                 
  179.                 Examples:
  180.                 
  181.                      Input Values        Mask        Output
  182.                 
  183.                        123456789     "%@@@-@@-@@@@"  123-45-6789
  184.                 
  185.                        102786        "%@@/@@/@@"     10/27/86
  186.                 
  187.        
  188.        Here is an example of a more complex query construction:
  189.        
  190.        
  191.        SELECT:
  192.        (EC = "UE" or "UW" or "UP") and Date = "????86" and Type = "C"
  193.        
  194.        
  195.        SORT:
  196.        EC
  197.        
  198.        
  199.        REPORT:
  200.        print   Date   Payee   EC   Amount   "%9,999,999.99"   bottom(EC)
  201.        total(Amount) "%9,999,999.99"
  202.        
  203.        
  204.        This query  selects  transactions  with  Expense Codes of "UE" or
  205.        "UW" or "UP" that have a Date  ending  with "86" that also have a
  206.        Type of "C".  Note that the  question  mark (?) is used as a wild
  207.        character, i.e., it  is  used  to  denote  "any  character".  The
  208.        output report is to be printed and  will contain the Date, Payee,
  209.        Expense Code and Amount.  A total  will be printed when there has
  210.        been a change in the expense code.
  211.        
  212.        Rules:
  213.        
  214.             (1)  The Select statement may contain these operators:
  215.        
  216.                     =  Equal to
  217.                     <> Unequal to
  218.                     <  Less than
  219.                     >  Greater than
  220.                     <= Less than or equal to
  221.                     >= Greater than or equal to
  222.        
  223.             (2)  The field on the left side  of  the  operator must be a
  224.        data name from the dictionary.
  225.        
  226.             (3)  The field on the  right  side  of  the  operator may be
  227.        either a data name or  literal.    Literals  must  be enclosed in
  228.        double quotes.
  229.        
  230.             (4)  In the case of equal and unequal,  the data name on the
  231.        left side of the operator is searched  for any occurrences of the
  232.        data specified on the right of the operator.
  233.        
  234.             (5)  The length of the item to the right of the operator may
  235.        not be greater than the  length  of  the  item to the left of the
  236.        operator.
  237.        
  238.             (6)  When used in a literal, the "?"  is wild.  For example,
  239.        to select all records in the database enter:
  240.        
  241.                    SELECT:
  242.                    Date  = "?"
  243.        
  244.             (7)  Commas may used to improve readability; otherwise, they
  245.        serve no useful purpose.
  246.        
  247.             (8)  All data names must be capitalized.  All other commands
  248.        must be in lower case.
  249.        
  250.        If your printer carriage is 80 columns in width, try setting your
  251.        printer preferences for compressed mode in order to print reports
  252.        that are greater than  80  characters  in  width.   Also, if your
  253.        printed output does not have the expected  appearance, check your
  254.        printer preferences.
  255.